// <editor-fold defaultstate="collapsed" desc="Đừng quan tâm"> 
/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package gui.vatnuoi;

import gui.event.khachhang.KHSuaThongTinDlg_evt;
import gui.event.vatnuoi.VNSuaThongTinDlg_evt;
import gui.khachhang.*;

/**
 *
 * @author nv_ca
 */
public class VNSuaThongTin_Dialog extends javax.swing.JDialog {

    /**
     * Creates new form KHSua
     */
    public VNSuaThongTin_Dialog(java.awt.Frame parent, boolean modal) {
        super(parent, modal);
        initComponents();
        this.setLocationRelativeTo(parent);
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        buttonGroup1 = new javax.swing.ButtonGroup();
        btnSave = new javax.swing.JButton();
        btnClose = new javax.swing.JButton();
        jScrollPane1 = new javax.swing.JScrollPane();
        taGhiChu = new javax.swing.JTextArea();
        rbtnCai = new javax.swing.JRadioButton();
        txtTenVatNuoi = new javax.swing.JTextField();
        rbtnDuc = new javax.swing.JRadioButton();
        txtCanNang = new javax.swing.JTextField();
        txtDoTuoi = new javax.swing.JTextField();
        lblTenVatNuoi = new javax.swing.JLabel();
        lblLoaiVatNuoi = new javax.swing.JLabel();
        lblGhiChu = new javax.swing.JLabel();
        lblGiong = new javax.swing.JLabel();
        lblDoTuoi = new javax.swing.JLabel();
        lblCanNang = new javax.swing.JLabel();
        lblMaVatNuoi = new javax.swing.JLabel();
        cboxLoaiVatNuoi = new javax.swing.JComboBox();
        txtMaVatNuoi = new javax.swing.JTextField();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Sửa thông tin vật nuôi");

        btnSave.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Save-16.png"))); // NOI18N
        btnSave.setText("Lưu");
        btnSave.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnSaveActionPerformed(evt);
            }
        });

        btnClose.setIcon(new javax.swing.ImageIcon(getClass().getResource("/gui/images/ultility/Close-16.png"))); // NOI18N
        btnClose.setText("Đóng");
        btnClose.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnCloseActionPerformed(evt);
            }
        });

        taGhiChu.setColumns(20);
        taGhiChu.setRows(5);
        jScrollPane1.setViewportView(taGhiChu);

        buttonGroup1.add(rbtnCai);
        rbtnCai.setFont(new java.awt.Font("Arial", 2, 11)); // NOI18N
        rbtnCai.setText("Cái");

        buttonGroup1.add(rbtnDuc);
        rbtnDuc.setFont(new java.awt.Font("Arial", 2, 11)); // NOI18N
        rbtnDuc.setSelected(true);
        rbtnDuc.setText("Đực");
        rbtnDuc.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                rbtnDucActionPerformed(evt);
            }
        });

        lblTenVatNuoi.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
        lblTenVatNuoi.setText("Tên vật nuôi:");

        lblLoaiVatNuoi.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
        lblLoaiVatNuoi.setText("Loại vật nuôi:");

        lblGhiChu.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
        lblGhiChu.setText("Ghi chú:");

        lblGiong.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
        lblGiong.setText("Giống (giới tính):");

        lblDoTuoi.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
        lblDoTuoi.setText("Độ tuổi:");

        lblCanNang.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
        lblCanNang.setText("Cân nặng:");

        lblMaVatNuoi.setFont(new java.awt.Font("Arial", 1, 11)); // NOI18N
        lblMaVatNuoi.setText("Mã vật nuôi:");

        cboxLoaiVatNuoi.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" }));
        cboxLoaiVatNuoi.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cboxLoaiVatNuoiActionPerformed(evt);
            }
        });

        txtMaVatNuoi.setEditable(false);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(0, 0, Short.MAX_VALUE)
                        .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(btnClose, javax.swing.GroupLayout.PREFERRED_SIZE, 95, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(layout.createSequentialGroup()
                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(layout.createSequentialGroup()
                                .addComponent(lblGiong)
                                .addGap(18, 18, 18)
                                .addComponent(rbtnDuc)
                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                .addComponent(rbtnCai))
                            .addGroup(layout.createSequentialGroup()
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(lblDoTuoi)
                                    .addComponent(lblCanNang)
                                    .addComponent(lblTenVatNuoi)
                                    .addComponent(lblLoaiVatNuoi)
                                    .addComponent(lblGhiChu)
                                    .addComponent(lblMaVatNuoi))
                                .addGap(39, 39, 39)
                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 301, Short.MAX_VALUE)
                                    .addComponent(txtDoTuoi, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 301, Short.MAX_VALUE)
                                    .addComponent(txtCanNang, javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(layout.createSequentialGroup()
                                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                            .addComponent(txtMaVatNuoi, javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(txtTenVatNuoi, javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup()
                                                .addComponent(cboxLoaiVatNuoi, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                                .addGap(73, 73, 73)))
                                        .addGap(138, 138, 138)))))
                        .addGap(0, 0, Short.MAX_VALUE)))
                .addContainerGap())
        );

        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {btnClose, btnSave});

        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblMaVatNuoi)
                    .addComponent(txtMaVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblTenVatNuoi)
                    .addComponent(txtTenVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblLoaiVatNuoi)
                    .addComponent(cboxLoaiVatNuoi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblGiong)
                    .addComponent(rbtnDuc)
                    .addComponent(rbtnCai))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblDoTuoi)
                    .addComponent(txtDoTuoi, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(lblCanNang)
                    .addComponent(txtCanNang, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGroup(layout.createSequentialGroup()
                        .addGap(31, 31, 31)
                        .addComponent(lblGhiChu)))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(btnClose)
                    .addComponent(btnSave))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        layout.linkSize(javax.swing.SwingConstants.VERTICAL, new java.awt.Component[] {btnClose, btnSave});

        pack();
    }// </editor-fold>//GEN-END:initComponents
//</editor-fold> 
    private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnSaveActionPerformed
        VNSuaThongTinDlg_evt.btnSaveActionPerformed();
    }//GEN-LAST:event_btnSaveActionPerformed

    private void btnCloseActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnCloseActionPerformed
        VNSuaThongTinDlg_evt.btnCloseActionPerformed(this);
    }//GEN-LAST:event_btnCloseActionPerformed

    private void cboxLoaiVatNuoiActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cboxLoaiVatNuoiActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_cboxLoaiVatNuoiActionPerformed

    private void rbtnDucActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_rbtnDucActionPerformed
        // TODO add your handling code here:
    }//GEN-LAST:event_rbtnDucActionPerformed
// <editor-fold defaultstate="collapsed" desc="Đừng quan tâm"> 
    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /* Set the Nimbus look and feel */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException ex) {
            java.util.logging.Logger.getLogger(VNSuaThongTin_Dialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (InstantiationException ex) {
            java.util.logging.Logger.getLogger(VNSuaThongTin_Dialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (IllegalAccessException ex) {
            java.util.logging.Logger.getLogger(VNSuaThongTin_Dialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(VNSuaThongTin_Dialog.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /* Create and display the dialog */
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                VNSuaThongTin_Dialog dialog = new VNSuaThongTin_Dialog(new javax.swing.JFrame(), true);
                dialog.addWindowListener(new java.awt.event.WindowAdapter() {
                    @Override
                    public void windowClosing(java.awt.event.WindowEvent e) {
                        System.exit(0);
                    }
                });
                dialog.setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnClose;
    private javax.swing.JButton btnSave;
    private javax.swing.ButtonGroup buttonGroup1;
    private javax.swing.JComboBox cboxLoaiVatNuoi;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JLabel lblCanNang;
    private javax.swing.JLabel lblDoTuoi;
    private javax.swing.JLabel lblGhiChu;
    private javax.swing.JLabel lblGiong;
    private javax.swing.JLabel lblLoaiVatNuoi;
    private javax.swing.JLabel lblMaVatNuoi;
    private javax.swing.JLabel lblTenVatNuoi;
    private javax.swing.JRadioButton rbtnCai;
    private javax.swing.JRadioButton rbtnDuc;
    private javax.swing.JTextArea taGhiChu;
    private javax.swing.JTextField txtCanNang;
    private javax.swing.JTextField txtDoTuoi;
    private javax.swing.JTextField txtMaVatNuoi;
    private javax.swing.JTextField txtTenVatNuoi;
    // End of variables declaration//GEN-END:variables
}
//</editor-fold>